<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑学生信息</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-4">
        <h1 class="mb-4">编辑学生信息</h1>
        <form method="post">
            <div class="mb-3">
                <label for="name" class="form-label">姓名:</label>
                <input type="text" class="form-control" id="name" name="name" value="{{ student.name }}" required>
            </div>
            <div class="mb-3">
                <label for="age" class="form-label">年龄:</label>
                <input type="number" class="form-control" id="age" name="age" value="{{ student.age }}" required>
            </div>
            <div class="mb-3">
                <label for="grade" class="form-label">年级:</label>
                <input type="text" class="form-control" id="grade" name="grade" value="{{ student.grade }}" required>
            </div>
            <button type="submit" class="btn btn-primary">更新</button>
        </form>
        <a href="{{ url_for('index') }}" class="btn btn-secondary mt-3">返回首页</a>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>